//
//  TestProblem1331.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/25.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

final class TestProblem1331: XCTestCase {

    var problem = Problem1331()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem1331_Case1() throws {
        XCTAssertEqual(problem.arrayRankTransform([40,10,20,30]), [4,1,2,3])
    }
    
    func testProblem1331_Case2() throws {
        XCTAssertEqual(problem.arrayRankTransform([100,100,100]), [1,1,1])
    }
    
    func testProblem1331_Case3() throws {
        XCTAssertEqual(problem.arrayRankTransform([37,12,28,9,100,56,80,5,12]), [5,3,4,2,8,6,7,1,3])
    }
}
